import { FormType, IMyFormProps } from '@/base-ui/base-form/type'
import { ActionDesc } from '@/global/constant'

const userListSearch: IMyFormProps = {
  // pageKey: PagesKey.UserList,
  desc: ActionDesc.UserSearch,
  layout: { span: 7 },
  formConfig: {
    name: 'wrap',
    size: 'middle',
    labelAlign: 'right',
    labelCol: { flex: '80px', offset: 2 },
    colon: false
  },
  itemsConfig: [
    {
      type: FormType.Input,
      prop: 'userName', //必写的，唯一标识,因为name属性不一定全部都会有
      label: '用户名',
      name: 'userName',
      input: {
        size: 'small',
        placeholder: '请输入用户名'
      }
    },
    {
      type: FormType.Input,
      prop: 'userPhone',
      label: '手机号',
      name: 'userPhone',
      input: {
        size: 'small',
        placeholder: '请输入手机号'
      }
    },
    {
      type: FormType.Input,
      prop: 'identityCard',
      label: '身份证',
      name: 'identityCard',
      input: {
        size: 'small',
        placeholder: '请输入身份证'
      }
    },
    {
      type: FormType.Select,
      prop: 'sex',
      label: '性别',
      name: 'sex',
      select: {
        baseProps: {
          placeholder: '请选择性别',
          size: 'small'
        },
        options: [
          { value: 0, content: '女' },
          { value: 1, content: '男' }
        ]
      }
    },
    {
      type: FormType.Select,
      prop: 'userType',
      label: '身份',
      name: 'userType',
      select: {
        baseProps: {
          placeholder: '请选择身份',
          size: 'small'
        },
        options: [
          { value: 0, content: '用户' },
          { value: 1, content: '管理员' }
        ]
      }
    },
    {
      type: FormType.Select,
      prop: 'status',
      label: '账号状态',
      name: 'status',
      select: {
        baseProps: {
          placeholder: '请选择账号状态',
          size: 'small'
        },
        options: [
          { value: 0, content: '封禁' },
          { value: 1, content: '正常' }
        ]
      }
    },
    {
      type: FormType.DatePicker,
      prop: 'createTime',
      label: '创建时间',
      name: 'createTime',
      date_picker: {
        showTime: true,
        size: 'small'
      }
    }
  ]
}

export default userListSearch
